package com.xhs.design.adapter;

import javax.servlet.http.HttpServletRequest;

/**
 * @desc: 适配器
 * @projectName: tools-parent
 * @author: xhs
 * @date: 2022/12/5 11:04
 * @version: JDK 1.8
 */
public interface ApiAdapter {

    /**
     * 判断具体实现类 到底是什么类型 通过该类型 查找到具体的适配器
     *
     * @param object object
     * @return boolean
     */
    boolean supports(Object object);

    /**
     * 不同实现类的具体实现
     *
     * @param httpServletRequest httpServletRequest
     * @param object             object
     * @return Object
     */
    Object handle(HttpServletRequest httpServletRequest, Object object);
}
